﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace elevator
{
    public partial class insertName : Form
    {
        private ElevatorSimulator es; 

        public insertName(ElevatorSimulator e)
        {
            InitializeComponent();
            txtSimName.Text = "";
            es = e; 
        }

        private void bttnSave_Click(object sender, EventArgs e)
        {
            es.setSimName(txtSimName.Text); 
            closeDialog();
        }

        private string returnSavedName()
        {
            return txtSimName.Text;
        }

        private DialogResult returnOK()
        {
            return DialogResult.OK;
        }

        private void closeDialog()
        {
            this.Close();
        }
    }
}
